#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
int dominantIndex(int* nums, int numsSize) {
    int max1 = 0;
    int max2 = 0;
    int place = 0;
    int i = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (max1 < nums[i])
        {
            max1 = nums[i];
            place = i;
        }
    }
    for (i = 0; i < numsSize; i++)
    {
        if (max2 < nums[i] && nums[i] < max1)
        {
            max2 = nums[i];
        }
    }
    if (max1 >= max2 * 2)
    {
        return place;
    }
    else
    {
        return -1;
    }
}

int main()
{
    int len = 0;
    scanf("%d", &len);
    int* arr = (int*)malloc(sizeof(int) * len);
    for (int i = 0; i < len; i++)
    {
        scanf("%d", &arr[i]);
    }
    int ret = dominantIndex(arr, len);
    free(arr);
    printf("%d", ret);
    return 0;
}